<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="view/default/style/basic.css" />
<link type="text/css" rel="stylesheet" href="view/default/style/flow.css" />
<script type="text/javascript" src="view/default/js/flow.js"></script>
<title>在线商城会员中心</title>
</head>
<body>
{include file="default/public/header.html"}
<div id="sait">
    当前位置：<a href="./">首页</a> &gt; 结算
</div>
<form method="post" name="flow" action="?a=cart&m=order">
    <table id="cart" cellspacing="1">
        <caption>商品列表</caption>
        <tr><th>编号</th><th>名称</th><th>属性</th><th class="th">售价</th><th class="th">数量</th><th>重量</th><th class="th">小计</th></tr>
        {assign var=num value=0}
        {foreach from=$myCart key=key item=value}
        <tr><td>{$value.sn}</td><td>{$value.name}</td><td>
            {foreach from=$value.attr key=k item=v}
                {$k}:
                {foreach from=$v key=k2 item=v2}
                {$v2};
                {/foreach} 
            {/foreach}
        </td>
        {assign var=weight value=$weight+$value.weight*$value.num}
        <td class="price">{$value.price_sale}元</td><td>{$value.num}</td><td>{$value.weight*$value.num}</td><td class="sprice" style="color:red;">{$value.total_small}元</td></tr>
        {/foreach}
    </table>
    <p> <a href="?a=cart">返回购物车</a>|商品共计:<strong class="price" id="total">{$total}</strong>元 </p>
    
    <table cellspacing="1">
        <caption>收货人信息</caption>
        <tr><td width="25%">收货人姓名:</td><td>{$address[0]->name}</td><td>电子邮件:</td width="25%"><td>{$address[0]->email}</td></tr>
        <tr><td>收货人地址:</td><td>{$address[0]->address}</td><td>邮政编码:</td><td>{$address[0]->zipcode}</td></tr>
        <tr><td>手机信息:</td><td>{$address[0]->phone}</td><td>标志性建筑:</td><td>{$address[0]->building}</td></tr>
    </table>
    
    <p><a href="?a=member&m=address">修改收货人信息</a></p>
    
    
    <table cellspacing="1" id="delivery_table">
        <caption>物流配送信息</caption>
        <tr><th width="10%"></th><th width="30%">名称</th><th width="50%">描述</th><th width="10%">运费</th></tr>
        {foreach from=$allDelivery key=key item=value}
        <tr><td><input type="radio" name="delivery_radio" add={$value->price_add} value="{if $address[0]->province == $smarty.const.PROVINCE}{$value->price_in}{else}{$value->price_out}{/if}" title="{$value->name}" onclick="changeDelivery(this);" /></td><td>{$value->name}</td><td>{$value->info}</td><td>{if $address[0]->province == $smarty.const.PROVINCE}{$value->price_in}元{else}{$value->price_out}元{/if}</td></tr>
        {/foreach}
        <tr><td colspan="4">总运费 = <span id="price1"></span> + (<span id="price3">{$weight}</span> - 10) * <span id="price2"></span></td></tr>
    </table>
    <b class="warning" id="d_warning">请先选择一个物流!</b>
    <p>你要支付的运费是多少：<strong id="delivery"></strong>元</p>
    
    <table cellspacing="1">
        <caption>支付方式</caption>
        <tr><th width="10%"></th><th width="30%">名称</th><th width="50%">描述</th><th width="10%">手续费</th></tr>
        <tr><td><input type="radio" name="pay_radio" value="0" title="支付宝" checked="checked" onclick="changePay(this);"/></td><td>支付宝</td><td>通过支付宝在线支付</td><td>0元</td></tr>
        <tr><td><input type="radio" name="pay_radio" value="2" title="银行转账/汇款" onclick="changePay(this);" /></td><td>银行转账/汇款</td><td>通过银行卡进行转账汇款</td><td>2元</td></tr>
        <tr><td><input type="radio" name="pay_radio" value="0" title="货到付款" onclick="changePay(this);" /></td><td>货到付款</td><td>通过配送人员送货收取费用</td><td>0元</td></tr>
    </table>
    
    <p>您要支付的手续费：<strong id="pay"></strong>元</p>
    
    <table cellspacing="1">
        <caption>备注信息</caption>
        <tr><th width="30%">订单备注</th><td class="left"><textarea name="text"></textarea></td></tr>
        <tr><th>缺货处理：</th><td class="left"><input type="radio" name="ps" value="等货物全了再发" />等货物全了再发  <input type="radio" name="ps" checked="checked" value="先发有货的"/>先发有货的  <input type="radio" name="ps" value="取消订单"/>取消订单</td></tr>
    </table>
    
    <p id="total_all">商品合计：<strong>{$total}</strong>元 + 物流费用：<strong></strong>元 + 手续费：<strong></strong>元</p>
    <br />
    <p>您总共要支付的金额：<strong class="price" id="price"></strong>元</p>
    
    <input type="hidden" name="user" value="{$smarty.cookies.user}" />
    <input type="hidden" name="name" value="肖永标" />
    <input type="hidden" name="email" value="781028081@qq.com" />
    <input type="hidden" name="address" value="广东省罗定市罗城镇" />
    <input type="hidden" name="zipcode" value="527200" />
    <input type="hidden" name="phone" value="13729008249" />
    <input type="hidden" name="building" value="罗定国际酒店" />
    <input type="hidden" name="delivery" value="" />
    <input type="hidden" name="pay" value="" />
    <input type="hidden" name="price" value="" />
    
    <p style="text-align:center;"><input type="submit" class="submit" name="send" value="" onclick="return checkFlow();" /></p>
</form>
{include file='default/public/footer.html'}
</body>
</html>